//-----------------------------------------------------------
// Algebra
//-----------------------------------------------------------
nh.Algebra = {};
Algebra.factorial = function(x) {
	if (x < 2) {
		return 1;
    } else {
    	return x * Algebra.factorial(x-1);
    	}
};
//alert(Algebra.factorial(5));
//-------------------------------------------------------------
// Geometry
//-------------------------------------------------------------
nh.Geometry = {};
Geometry.distance = function(x1, y1, x2, y2){
    var dx = x2 - x1;
    var dy = y2 - y1;
    return Math.sqrt(dx*dx + dy*dy);
};
//alert(Geometry.distance2D(1, 1, 2, 2));
